import { IEvents } from "./IEvent";
import { IBind, IBindDbField } from "./IBind";

export function getDefDBField(): IBindDbField {
    return { title: "", name: "", fieldId: 0 }
}
export interface IDbFieldWidget {
    props: {
        dbField: IBindDbField;
        class: string[];
        style: Record<string, any>;
        bind: IBind;
        [key: string]: any | any[];
    }
}

// 定义 iwidget 接口的类型  
export interface IWidget {
    cmpnt: string;
    category: string;
    valueKey: string;
    props: {
        class: string[];
        style: Record<string, any>;
        bind: IBind;
        [key: string]: any | any[];
    };
    events: IEvents;
    ctl: {
        icon?: string;
        name: string;
        group: string;
        text: string;
    };

    [key: string]: any | any[];
}